﻿//	Plazes-ASPI is an AS2.0 abstraction of the Plazes (http://www.plazes.com) XMLRPC-API
//		Copyright (C) 2006	Florian Mlodzik
//
//		This library is free software; you can redistribute it and/or
//		modify it under the terms of the GNU Lesser General Public
//		License as published by the Free Software Foundation; either
//		version 2.1 of the License, or (at your option) any later version.
//
//		This library is distributed in the hope that it will be useful,
//		but WITHOUT ANY WARRANTY; without even the implied warranty of
//		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
//		Lesser General Public License for more details.
//
//		You should have received a copy of the GNU Lesser General Public
//		License along with this library; if not, write to the Free Software
//		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

// svn:keywords
// $URL: http://plazes-aspi.googlecode.com/svn/trunk/src/as2/com/orthogeneric/webapis/plazes/methods/PlazeMethods.as $
// $Id: PlazeMethods.as 5 2006-08-07 19:54:11Z florian.mlodzik $

/**
* The PlazeMethods-class provides abstracted methods for all remote procedures available in the "plaze" group
*
* @author florian.mlodzik@gmail.com
* @version 1.0
* @see PlazesService#plaze
* @see <a href="http://api.plazes.com/wiki/index.php/Plazes_API_Documentation" target="_blank">PlazesApi documenation</a>
*/

// import -->
import com.orthogeneric.webapis.plazes.methods.MethodsBase;
import com.orthogeneric.webapis.plazes.PlazesService;
import com.orthogeneric.webapis.plazes.rpc.RPCall;
// <-- import

class com.orthogeneric.webapis.plazes.methods.PlazeMethods extends MethodsBase 
{
	/**
	* The PlazeMethods-class constructor.
	* 
	* @param	srvc A reference to the PlazesService-instance compositing this PlazeMethods-instance
	*/
	public function PlazeMethods(srvc:PlazesService)
	{
		super(srvc);
		group = "plaze"; // instance variable inherited from baseclass	
	}
	
	/**
	* The instance-method to invoke the remote "plaze.info" procedure call. 
	* 
	* @param key The key for a plaze 
	* @see <a href="http://api.plazes.com/wiki/index.php/Plaze.info" target="_blank">PlazesApi documentation: plaze.info</a> 
	*/
	public function getInfo(key:String):Void
	{
		RPCall.invoke(this, "getInfo", group + ".info", key);  
	}
	
	/**
	* The instance-method to invoke the remote "plaze.comments" procedure call.
	* 
	* @param key The key for a plaze
	* @see <a href="http://api.plazes.com/wiki/index.php/Plaze.comments" target="_blank">PlazesApi documentation: plaze.comments</a>
	*/
	public function getComments(key:String):Void
	{
		RPCall.invoke(this, "getComments", group + ".comments", key);
	}
	
	/**
	* The instance-method to invoke the remote "plaze.photos" procedure call.
	* 
	* @param key The key for a plaze
	* @see <a href="http://api.plazes.com/wiki/index.php/Plaze.photos" target="_blank">PlazesApi documentation: plaze.photos</a>
	*/
	public function getPhotos(key:String):Void
	{
		RPCall.invoke(this, "getPhotos", group + ".photos", key);
	}
	
	/**
	* The instance-method to invoke the remote "plaze.distance" procedure call.
	* 
	* @param fromKey The key for a plaze
	* @param toKey The key for a second plaze that the distance should be measured to
	* @see <a href="http://api.plazes.com/wiki/index.php/Plaze.distance">PlazesApi documentation: plaze.distance</a>
	*/
	public function getDistance(fromKey:String, toKey:String):Void
	{
		RPCall.invoke(this, "getDistance", group + ".distance", fromKey, toKey);
	}
	
	/**
	* The instance-method to invoke the remote "plaze.people" procedure call.
	*
	* @param key The key for a plaze
	* @see <a href="http://api.plazes.com/wiki/index.php/Plaze.people" target="_blank">PlazesApi documentation: plaze.people</a>
	*/
	public function getPeople(key:String):Void
	{
		RPCall.invoke(this, "getPeople", group + ".people", key);
	}
}
